﻿#region

using System;
using System.ComponentModel.DataAnnotations;

#endregion

namespace CuongHanh.Models
{
    public class Collection : BaseClass
    {
        public Collection()
        {
        }

        public Collection(Collection model)
        {
            NameVi = model.NameVi;
            NameEn = model.NameEn;
            RemarkVi = model.RemarkVi;
            RemarkEn = model.RemarkEn;
            CreateDate = DateTime.Now;
            ShowIndex = model.ShowIndex;
            Invisible = model.Invisible;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        [Required]
        [Display(Name = "Tên T.Việt")]
        public string NameVi { get; set; }

        [Display(Name = "Tên T.Anh")]
        public string NameEn { get; set; }

        [Display(Name = "Hiển thị trang chủ")]
        public bool ShowIndex { get; set; }

        [Display(Name = "Ẩn")]
        public bool Invisible { get; set; }

        [Display(Name = "Ngày tạo")]
        public DateTime CreateDate { get; set; }

        [Display(Name = "Ghi chú T.Việt")]
        public string RemarkVi { get; set; }

        [Display(Name = "Ghi chú T.Anh")]
        public string RemarkEn { get; set; }

        public void UpdateInfoFrom(Collection model)
        {
            NameVi = model.NameVi;
            NameEn = model.NameEn;
            RemarkVi = model.RemarkVi;
            RemarkEn = model.RemarkEn;
            CreateDate = DateTime.Now;
            ShowIndex = model.ShowIndex;
            Invisible = model.Invisible;
            LastModified = DateTime.Now;
        }
    }
}
